export const MultiCategoryMixin = {
    data () {
        return {
            mixinTreeOptions: [],
        }
    },
    methods: {
        mixinGetAllCategory (type) {
            return new Promise((resolve, reject) => {
                // 目前全部都是后台类目，所有type一定为1！
                this.$store.dispatch('getMixinTreeOptions', { type }).then(res => {
                    this.mixinTreeOptions = res
                    resolve(this.mixinTreeOptions)
                })
            })
        },
    },
}
